package com.service.impl;

import com.dao.RoleFunctionDAO;
import com.dao.RoleMenuDAO;
import com.dao.impl.RoleFunctionDaoImpl;
import com.dao.impl.RoleMenuDaoImpl;
import com.entity.Function;
import com.entity.MenuInfo;
import com.entity.RoleFunction;
import com.entity.RoleMenu;
import com.service.RoleFunctionService;
import com.service.RoleMenuService;

import java.util.ArrayList;
import java.util.List;

/**
 * 权限变更的业务逻辑类
 * 
 * @author xieqing
 * 
 */
public class RoleFunctionServiceImpl implements RoleFunctionService {

	RoleFunctionDAO dao = new RoleFunctionDaoImpl();
	public List<Function> getFunctionList(Integer roleId) {
		return dao.getFunctionList(roleId);
	}

	@Override
	public boolean powerChange(List<RoleFunction> list) {
		if (list != null && list.size() > 0) {
			return dao.add(list);
		}
		return false;
	}
}
